#include<bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    string op;
    int i = 1;
    while (cin >> op) {
        if (op == "End") break;
        if (i % (n + 1) == 0) {
            cout << op << endl;
        } else {
            if (op == "JianDao") cout << "ChuiZi" << endl;
            else if (op == "ChuiZi") cout << "Bu" << endl;
            else cout << "JianDao" << endl;
        }
        i++;
    }
    return 0;
}